"""
Module: 'aioble.l2cap' on micropython-v1.25.0-rp2-RPI_PICO2_W
"""

# MCU: {'build': '', 'ver': '1.25.0', 'version': '1.25.0', 'port': 'rp2', 'board': 'RPI_PICO2_W', 'mpy': 'v6.3', 'family': 'micropython', 'cpu': 'RP2350', 'arch': 'armv7emsp'}
# Stubber: v1.24.0
from __future__ import annotations
from typing import Generator
from _typeshed import Incomplete

_listening: bool = False

def register_irq_handler(*args, **kwargs) -> Incomplete: ...
def _l2cap_irq(*args, **kwargs) -> Incomplete: ...
def _l2cap_shutdown(*args, **kwargs) -> Incomplete: ...
def log_error(*args, **kwargs) -> Incomplete: ...
def const(*args, **kwargs) -> Incomplete: ...
def accept(*args, **kwargs) -> Generator:  ## = <generator>
    ...

ble: Incomplete  ## <class 'BLE'> = <BLE>

class L2CAPChannel:
    def available(self, *args, **kwargs) -> Incomplete: ...
    def _assert_connected(self, *args, **kwargs) -> Incomplete: ...
    def disconnected(*args, **kwargs) -> Generator:  ## = <generator>
        ...

    def recvinto(*args, **kwargs) -> Generator:  ## = <generator>
        ...

    def send(*args, **kwargs) -> Generator:  ## = <generator>
        ...

    def flush(*args, **kwargs) -> Generator:  ## = <generator>
        ...

    def disconnect(*args, **kwargs) -> Generator:  ## = <generator>
        ...

    def __init__(self, *argv, **kwargs) -> None: ...

def connect(*args, **kwargs) -> Generator:  ## = <generator>
    ...

class L2CAPConnectionError(Exception): ...
class L2CAPDisconnectedError(Exception): ...

class DeviceConnection:
    _connected: dict = {}
    def is_connected(self, *args, **kwargs) -> Incomplete: ...
    def _run_task(self, *args, **kwargs) -> Incomplete: ...
    def services(self, *args, **kwargs) -> Incomplete: ...
    def timeout(self, *args, **kwargs) -> Incomplete: ...
    def device_task(*args, **kwargs) -> Generator:  ## = <generator>
        ...

    def l2cap_connect(*args, **kwargs) -> Generator:  ## = <generator>
        ...

    def pair(*args, **kwargs) -> Generator:  ## = <generator>
        ...

    def service(*args, **kwargs) -> Generator:  ## = <generator>
        ...

    def l2cap_accept(*args, **kwargs) -> Generator:  ## = <generator>
        ...

    def disconnected(*args, **kwargs) -> Generator:  ## = <generator>
        ...

    def exchange_mtu(*args, **kwargs) -> Generator:  ## = <generator>
        ...

    def disconnect(*args, **kwargs) -> Generator:  ## = <generator>
        ...

    def __init__(self, *argv, **kwargs) -> None: ...
